package org.example.chatroom.service;

import org.example.chatroom.common.pojo.dataobject.FriendRequest;
import org.example.chatroom.common.pojo.request.AddFriendRequest;
import org.example.chatroom.common.pojo.request.FriendSearchRequest;
import org.example.chatroom.common.pojo.response.FriendResponse;
import org.example.chatroom.common.pojo.response.FriendSearchResponse;
import org.example.chatroom.common.pojo.response.WebSocketFriendRequestResponse;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 好友服务接口
 */
public interface FriendService {
    // 获得好友列表
    List<FriendResponse> getfriendlist(Integer userId);

    // 搜索好友
    List<FriendSearchResponse> searchFriends(FriendSearchRequest request);

    // 处理好友请求
    void handleFriendRequest(Integer userId, Integer friendRequestId, String action);

    // 获取离线好友请求
    List<WebSocketFriendRequestResponse> getOfflineFriendRequests(Integer userId, LocalDateTime offlineTime);

    void add(FriendRequest friendRequest);
}